<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ include file="/jsps/baseTaglibJsp.jsp"%>

<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
	<head>
		<base href="<%=basePath%>">
		<title>发布公告</title>
		<link type="text/css" rel="stylesheet"
			href="<%=path%>/css/StyleSheet.css" charset="utf-8" />
		<script type="text/javascript" src="<%=path%>/js/jquery-1.8.3.min.js"></script>
		<script type="text/javascript"
			src="<%=path%>/plugin/ckeditor_4.1/ckeditor.js"></script>
		<script type="text/javascript"
			src="<%=path%>/plugin/formvalidator4.1.3/formValidator-4.1.3.js"></script>
		<script type="text/javascript"
			src="<%=path%>/plugin/formvalidator4.1.3/formValidatorRegex.js"></script>
		<script type="text/javascript"
			src="<%=path%>/plugin/formvalidator4.1.3/DateTimeMask.js"></script>
		<script type="text/javascript"
			src="<%=path%>/plugin/My97DatePicker/WdatePicker.js"></script>
		<script type="text/javascript">
	$(function() {
	    
	    $("#btnBack").bind("click",function(){
	        window.history.back();
	    });
	    
		var editor = CKEDITOR.replace('content', {
			skin : 'moono',
			language : 'zh-cn',
			width : 700,
			height : 300
		});
		//设值 CKEDITOR.instances.文本域name.setData("脚本之家");
		//editor.setData("ffff");
		//取值CKEDITOR.instances.文本域name.getData()
		$.formValidator.initConfig( {
			formID : "placardForm",
			theme : 'ArrowSolidBox',
			mode : 'AutoTip',
			onError : function(msg) {
				alert(msg)
			},
			inIframe : true
		});
		$("#title").formValidator( {
			onFocus : "标题不能为空"
		}).inputValidator( {
			min : 1,
			onError : "标题不能为空,请输入"
		});
		$("#closeTime").formValidator( {
			onFocus : "截止时间不能为空"
		}).inputValidator( {
			min : 1,
			onError : "截止时间不能为空,请输入"
		});
		$.formValidator.reloadAutoTip();
	});
</script>
	</head>

	<body>
		<div class="mbx">
			发布公告
		</div>
		<s:form id="placardForm" action="placard!create" namespace="/lcd">
			<fieldset>
				<legend>
					<s:submit value="保存" cssClass="submitcss" />
					<input class="submitcss" type="button" id="btnBack" value="返回"/>
				</legend>
				<table>
					<tr>
						<td>
							标题:
						</td>
						<td>
							<s:textfield id="title" name="title" />
						</td>
					</tr>
					<tr>
						<td>
							截止时间:
						</td>
						<td>
							<s:textfield id="closeTime" name="closeTime" cssClass="Wdate"
								onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss'});"></s:textfield>
						</td>
					</tr>
					<tr>
						<td style="vertical-align: top;">
							内容:
						</td>
						<td>
							<s:textarea id="content" name="content"></s:textarea>
						</td>
					</tr>
				</table>
			</fieldset>
		</s:form>
	</body>
</html>
